import { YFWRequestOptions, IPlugin } from "./types";
import YFWRequestImpl from "./yfwRequestImpl";
import { DebuouncePlugin } from "./plugins/debouncePlugin";
import { ThrottlePlugin } from "./plugins/throttlePlugin";
import { RetryPlugin } from "./plugins/retryPlugin";

export default function YFWRequest(options: YFWRequestOptions, plugins: IPlugin[] = []) {
    return YFWRequestImpl(options, [...plugins, DebuouncePlugin, ThrottlePlugin, RetryPlugin])
}